/**
 * 
 */
package kr.co.goodwilldd;

import org.springframework.util.Assert;

/**
 * @author IN-SOFT Inc. GoodwillDD(sylee@in-soft.co.kr)
 * 
 */
public class CheckSum {
	public static void main(String[] args) {
		try {
			Assert.noNullElements(args);
		} catch (IllegalArgumentException e) {
			System.out.println("# using example");
			System.out
					.println("java checksum.jar [targetPath] [excelfilename]");
			System.exit(0);
		}
		CheckSumUtil checkSumUtil = new CheckSumUtil(args[0]);
		try {
			switch (args.length) {
			case 1:
				System.out.println("##### Not export Excel Only Log");
				checkSumUtil.checkSum(true);
				break;
			case 2:
				checkSumUtil.makeExcel(args[1]);
				break;
			default:
				System.out.println("# using example");
				System.out
						.println("java checksum.jar [targetPath] [excelfilename]");
				break;
			}

		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}
	}
}
